package com.dabai.simpleconnection_udp.bean;

/**
 * Description : Other
 *
 * @author BAI
 */
public class UdpMsgModel {

    long id;
    String name;
    String note;
    String last;
    String ip;

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public UdpMsgModel(String name, int port) {
        this.name = name;
        this.port = port;
    }

    String content;
    boolean mode;

    public UdpMsgModel(String name, String note, String last, String ip, String content, boolean mode, int port) {
        this.name = name;
        this.note = note;
        this.last = last;
        this.ip = ip;
        this.content = content;
        this.mode = mode;
        this.port = port;
    }

    public UdpMsgModel(long id, String name, String note, String last, String ip, String content, boolean mode, int port) {
        this.id = id;
        this.name = name;
        this.note = note;
        this.last = last;
        this.ip = ip;
        this.content = content;
        this.mode = mode;
        this.port = port;
    }

    public String isMode() {
        return mode?"监听中":"端口冲突";
    }

    public void setMode(boolean mode) {
        this.mode = mode;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    int port;

    public UdpMsgModel(String name, String note, String last, int port) {
        this.name = name;
        this.note = note;
        this.last = last;
        this.port = port;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getLast() {
        return last;
    }

    public void setLast(String last) {
        this.last = last;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    @Override
    public String toString() {
        return "UdpMsgModel{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", note='" + note + '\'' +
                ", last='" + last + '\'' +
                ", ip='" + ip + '\'' +
                ", content='" + content + '\'' +
                ", mode=" + mode +
                ", port=" + port +
                '}';
    }
}
